<?php
class system_indexAction extends security_login {
	
	function action(){
		$miceSession = new session();
		$user=new model_User();
		$user->setSubsection('WHERE user_id='.$miceSession->get('userid'));
		$users=$user->doSelectOne();

		$group=new model_Group();
		$group->setSubsection('WHERE group_id='.$miceSession->get('groupid'));
		$groups=$group->doSelectOne();

		$user2=new model_User();
		$usernum=$user2->doCount();

		$article=new model_Article();
		$article->setSubsection('WHERE type LIKE \'article%\'');
		$articlenum=$article->doCount();

		$category=new model_Category();
		$category->setSubsection('WHERE type LIKE \'article%\'');
		$categorynum=$category->doCount();

		$form1=new model_Form();
		$form1->setSubsection('WHERE (type = \'article\' OR type = \'list\') AND isview=0');
		$formnum1=$form1->doCount();

		$form2=new model_Form();
		$form2->setSubsection('WHERE type = \'guestbook\' AND isview=0');
		$formnum2=$form2->doCount();

		$form3=new model_Form();
		$form3->setSubsection('WHERE type = \'link\' AND isview=0');
		$formnum3=$form3->doCount();

		$form4=new model_Form();
		$form4->setSubsection('WHERE type = \'product\' AND isview=0');
		$formnum4=$form4->doCount();

		$form5=new model_Form();
		$form5->setSubsection('WHERE type = \'job\' AND isview=0');
		$formnum5=$form5->doCount();

		$smarty = new Smarty();
		$smarty->load_filter('pre','micePreCompileAdmin');
		$smarty->assign("title","miceCMS会员登录");
		$smarty->assign("users",$users);
		$smarty->assign("groups",$groups);

		$smarty->assign("usernum",$usernum);
		$smarty->assign("articlenum",$articlenum);
		$smarty->assign("categorynum",$categorynum);
		$smarty->assign("formnum1",$formnum1);
		$smarty->assign("formnum2",$formnum2);
		$smarty->assign("formnum3",$formnum3);
		$smarty->assign("formnum4",$formnum4);
		$smarty->assign("formnum5",$formnum5);

		$filename = new getTPLFileName(__CLASS__);
		$smarty->display($filename->TPLFileName);
	}
}
?>